var input = document.querySelectorAll('input')
var p = document.querySelector('p')
var btn = document.querySelector('button')

p.onclick = () => {
    location.href = '/enroll.html'
}

btn.onclick = () => {
    console.log(111);
    axios.post('/user/zhuce' , {username:input[0].value , pass:input[1].value}).then((res) => {
        alert(res.data.mas)
        if(res.data.code == 200){
            localStorage.setItem('token',res.data.token)
            localStorage.setItem('username',JSON.stringify(input[0].value))
            location.href = '/home.html'
        }
    })
}